from tortoise import BaseDBAsyncClient


async def upgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `tb_monitor_log` MODIFY COLUMN `url` VARCHAR(255) NOT NULL COMMENT '请求地址';
        ALTER TABLE `tb_monitor_log` MODIFY COLUMN `summary` VARCHAR(255) NOT NULL COMMENT '接口说明';"""


async def downgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `tb_monitor_log` MODIFY COLUMN `url` VARCHAR(20) NOT NULL COMMENT '请求地址';
        ALTER TABLE `tb_monitor_log` MODIFY COLUMN `summary` VARCHAR(20) NOT NULL COMMENT '接口说明';"""
